//
//  MultiTouchExampleViewController.m
//  MultiTouchExample
//

#import "MultiTouchExampleViewController.h"

@implementation MultiTouchExampleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	float boxSize = 100.0;
	CGRect redBoxRect = CGRectMake(110,180,boxSize,boxSize);
	redBox = [[UIView alloc] initWithFrame:redBoxRect];
	redBox.backgroundColor = [UIColor redColor];
	redBox.multipleTouchEnabled = YES;
	
	[self.view addSubview:redBox];
}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
	for (UITouch *touch in [event touchesForView:redBox])
		NSLog(@"touch at location: %@",
			  NSStringFromCGPoint([touch locationInView:self.view]));
}

- (void)dealloc {
	[redBox release];
    [super dealloc];
}

@end
